package com.mzy.linear_struct.subject;

import java.util.LinkedList;

/**
 * @Author: codermzy
 * @Date: 2024/04/26/下午9:02
 * @Description:
 */
public class 对称二叉树101 {
    static class TreeNode {
        int val;
        TreeNode left;
        TreeNode right;

        TreeNode() {
        }

        TreeNode(int val) {
            this.val = val;
        }

        TreeNode(int val, TreeNode left, TreeNode right) {
            this.val = val;
            this.left = left;
            this.right = right;
        }
    }

    static class Solution {
        public boolean isSymmetric(TreeNode root) {

            LinkedList<Integer> deque = new LinkedList<>();

            deque.addFirst(root.val);

            while (!deque.isEmpty()) {
                Integer node = deque.pollFirst();

                deque.add(root.left.val);
                deque.add(root.right.val);
            }


            return true;
        }


    }
}
